import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const IdKey = 'UserId'
const Identity = 'Identity'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getId() {
  return Cookies.get(IdKey)
}

export function setId(id) {
  return Cookies.set(IdKey, id)
}

export function getIdentity() {
  return Cookies.get(Identity)
}

export function setIdentity(identity) {
  return Cookies.set(Identity, identity)
}

export function removeIdentity() {
  return Cookies.remove(Identity)
}
